<?php

namespace App\Http\Requests\Home;

use Illuminate\Foundation\Http\FormRequest;

class UserEmailResetPwd extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'email'     => 'required|email',
            'emailcode' => 'required',
            'code'      => 'required',
        ];
    }

    public function messages()
    {  
        return [
            'email.required'     => '请输入邮箱',
            'email.email'        => '邮箱不合法',

            'emailcode.required' => '请输入邮箱验证码',
            'code.required'      => '请输入验证码',
        ];
        
    }
}
